#include "ioc.h"

void led_on(char *led)
{
    return write_file(led, "1");
}

void led_off(char *led)
{
    return write_file(led, "0");
}

void led_toggle(char *led)
{
    char *msg = read_file(led);
    int led_status = atoi(msg);
    if (led_status == 1)
    {
        led_off(led);
    }
    else
    {
        led_on(led);
    }
}